<%@ tag %>
<%@ attribute name="path" required="true" %>
<%@ attribute name="label" required="true" %>
<%@ attribute name="size" required="true" %>
<%@ attribute name="maxlength" required="false" %>
<%@ attribute name="calendar" required="false" %>
<%@ attribute name="required" required="false" %>
<%@ attribute name="password" required="false" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="/spring" %>

    <c:if test="${empty maxlength}">
      <c:set var="maxlength" value="${size}"/>
    </c:if>

    <tr>
        <td colspan=2 class="validationError"><form:errors path="${path}"/></td>
    </tr>
    <tr>
        <td><c:if test='${required == "true"}'>* </c:if><fmt:message key="${label}"/></td>
        <td>
            <c:choose>
                <c:when test='${password == "true"}'>
                    <form:password path="${path}" size="${size}" maxlength="${maxlength}"/>
                </c:when>
                <c:otherwise>            
                    <form:input path="${path}" size="${size}" maxlength="${maxlength}"/>
                </c:otherwise>
            </c:choose>
        </td>
        <%--c:if test='${calendar == "true"}'>
            <td><A HREF="#" onClick="cal.select(document.forms['queryParams'].${path},'anchor1','MM-dd-yyyy'); return false;" NAME="anchor1" ID="anchor1">calendar</A></td>
        </c:if--%>
    </tr>

